import $http from "@/utils/http/index";
import type {
  ReplyReq,
  IRes,
  GetReplyByIdReq,
  DeleteReplyByIdReq
} from "../type/comment";

// 回复
export function reply(data: ReplyReq) {
  return $http.post<IRes>({
    url: "/api/comment/reply",
    data,
  });
}

// 根据启事id获取所有回复
export function getReplyById(data: GetReplyByIdReq) {
  return $http.get<IRes>({
    url: "/api/comment/getReplyById",
    params: data,
  });
}

// 根据回复id删除回复
export function deleteReplyById(data: DeleteReplyByIdReq) {
  return $http.delete<IRes>({
    url: "/api/comment/deleteReplyById",
    params: data,
  });
}
